﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Data;

namespace ESC.Designer.Resources
{
    public class RuncardStateConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value != null)
            {
                if (value.ToString() == "N")
                {
                    return "生產中";
                }
                else if (value.ToString() == "C")
                {
                    return "正常結案";
                }
                else if (value.ToString() == "H")
                {
                    return "手動結案";
                }
                else if (value.ToString() == "F")
                {
                    return "作廢結案";
                }
                else if (value.ToString() == "U")
                {
                    return "并批結案";
                }
                else
                {
                    return "";
                }
            }
            else
            {
                return "";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
